<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title></title>
    <style media="screen">
      #video {
        width: 100vw;
        height: 100vw;
      }
    </style>
    <script src="js/jquery-3.1.0.js" charset="utf-8"></script>

  </head>
  <body>
    <video  autoplay id="video" controls="controls">

    </video>
  </body>
  <script type="text/javascript">
    $.ajax({
    url:"http://is.snssdk.com/neihan/stream/mix/v1/?mpic=1&webp=1&essence=1&content_type=-101&message_cursor=-1&am_longitude=116.189866&am_latitude=39.900608&am_city=%E5%8C%97%E4%BA%AC%E5%B8%82&am_loc_time=1476316965307&count=30&min_time=1476449964&screen_width=1080&iid=5779745657&device_id=10634208495&ac=wifi&channel=huawei&aid=7&app_name=joke_essay&version_code=560&version_name=5.6.0&device_platform=android&ssmix=a&device_type=PLK-AL10&device_brand=HONOR&os_api=23&os_version=6.0&uuid=860582030843094&openudid=eb6700f5028cb4da&manifest_version_code=560&resolution=1080*1812&dpi=480&update_version_code=5603",
    dataType:'jsonp',
    success:function(obj) {
      console.log(obj);
      var category_name = obj.data.data[1].group.category_name;
      if ( category_name == "搞笑视频") {

        var mp4_url = obj.data.data[1].group.mp4_url;
        var category_name = obj.data.data[0].group.category_name;
          var mp4_url = obj.data.data[1].group.mp4_url;
          $("#video")[0].src = mp4_url;
          console.log(mp4_url);
        }else{
          window.location.reload();
        }
    }
  });



  </script>
</html>
